home *** CD-ROM | disk | FTP | other *** search
- /* arexx Script
- */
-
- options results
- parse ARG Port flag b
-
- ADDRESS value Port
-
- pp_GetWidthB
- w=result
-
- pp_GetHeightB
- h=result
-
- pp_GetDepth
- d=result
-
- if w=0 then exit
-
- if d<24 then DO
- pp_Psave "ram:palette.trash" 0
- END
-
- IF flag=-1 then DO
- pp_FindEmptyBuffer
- flag=result
- if flag=-1 then DO
- pp_Warn "can't*find*empty|Buffer."
- EXIT
- END
- END
-
- pp_SetBuffer flag
-
- pp_GetWidth
- if result~=0 then DO
- pp_Request "This*Buffer*is*not*empty.|Do*you*want*to*erase*it*?"
- if result=0 then DO
- EXIT
- END
- ELSE DO
- pp_ClearCurrentBuffer
- END
- END
-
- pp_new w h d
- pp_GetWidth
- IF result=0 then DO
- pp_Warn "Not*enough*memory."
- EXIT
- END
-
- IF D<24 then DO
- pp_Pload "ram:palette.trash"
- ADDRESS COMMAND
- 'delete >nil: ram:palette.trash'
- ADDRESS value Port
- END
-
- pp_GetBrushMode
- BM=result
-
- pp_ClosestColor 255 255 255
- White=result
- pp_ClosestColor 0 0 0
- Black=result
-
- pp_EffectOff
- pp_SetBpen White
- pp_SetApen Black
- pp_SpareOnOff
- pp_Cls
- pp_setBrushMode 2
- pp_plot w/2 h/2
- pp_SparetoStencil
- pp_Cls
- pp_SpareOnOff
- pp_setBrushMode 3
- pp_plot w/2 h/2
- pp_setBrushMode BM
-
- EXIT
-